import adminSupport from 'lola-admin-support-el'
const constants = adminSupport.lib.sysConstant
constants.banks = ['网银', '支付宝', '微信']
constants.isBind = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '未绑定', color: '#F56C6C' }],
    [1, { value: 1, label: '已绑定', color: '#409EFF' }]
  ]
)
constants.locationType = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '纸厂地址', color: '#409EFF' }],
    [1, { value: 1, label: '运输地址', color: '#909399' }]
  ]
)
constants.isArchive = new Map(
  [
    ['All', { value: 'All', label: '全部', color: '' }],
    [0, { value: 0, label: '未归档', color: '#409EFF' }],
    [1, { value: 1, label: '已归档', color: '#909399' }]
  ]
)
constants.carUsed = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    ['Y', { value: 'Y', label: '已启用', color: '#F56C6C' }],
    ['N', { value: 'N', label: '已停用', color: '#409EFF' }]
  ]
)
constants.originType = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '采购', color: '#409EFF' }],
    [1, { value: 1, label: '其他', color: '#909399' }]
  ]
)
constants.expensesExists = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '未创建', color: '#E6A23C' }],
    [1, { value: 1, label: '已创建', color: '#67C23A' }]
  ]
)

constants.distributeStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [1, { value: 1, label: '已分配', color: '#E6A23C' }],
    [0, { value: 0, label: '未分配', color: '#67C23A' }]
  ]
)

constants.logisticsOrderStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '待发车', color: '#909399' }],
    [1, { value: 1, label: '已发车，待签收', color: '#409EFF' }],
    [2, { value: 2, label: '已签收，待定价', color: '#E6A23C' }],
    [3, { value: 3, label: '已定价，待收款', color: '#F56C6C' }],
    [4, { value: 4, label: '已完成', color: '#67C23A' }],
    [-1, { value: -1, label: '已取消', color: '#C0C4CC' }]
  ]
)
constants.logisticsOrderSuccessStatus = new Map(
  [
    [0, { value: 0, label: '待发车', color: '#409EFF' }],
    [1, { value: 1, label: '待签收', color: '#409EFF' }],
    [2, { value: 2, label: '待定价', color: '#F56C6C' }],
    [3, { value: 3, label: '待收款', color: '#409EFF' }]
  ]
)
constants.backCarStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', color: '' }],
    ['W', { value: 'W', label: '待预定', color: '#F56C6C' }],
    ['Y', { value: 'Y', label: '已预订', color: '#409EFF' }],
    ['N', { value: 'N', label: '已过期', color: 'black' }]
  ]
)
// 回头车状态
constants.BackCarType = new Map(
  [
    ['All', { value: 'All', label: '全部', color: '' }],
    ['W', { value: 'W', label: '待预定', color: '#F56C6C' }],
    ['Y', { value: 'Y', label: '已预订', color: '#409EFF' }],
    ['N', { value: 'N', label: '已过期', color: 'black' }],
    ['C', { value: 'C', label: '待审核', color: '#909399' }]
  ]
)

constants.certificationStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '未认证', color: '#F56C6C' }],
    [1, { value: 1, label: '待审核', color: '#F56C6C' }],
    [2, { value: 2, label: '审核不通过', color: '#F56C6C' }],
    [3, { value: 3, label: '认证通过', color: '#489EFF' }]
  ]
)
constants.certifiedType = new Map(
  [
    [0, { value: 0, label: '个人', color: '#F56C6C' }],
    [1, { value: 1, label: '个体户', color: '#F56C6C' }],
    [2, { value: 2, label: '企业', color: '#409EFF' }]
  ]
)
constants.isTrueFlase = new Map(
  [
    [0, { value: 0, label: '否', color: '#409EFF' }],
    [1, { value: 1, label: '是', color: '#F56C6C' }]
  ]
)
constants.costStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', color: '#F56C6C' }],
    [0, { value: 0, label: '待核对', color: '#909399', type: 'info' }],
    [1, { value: 1, label: '待结算', color: '#F56C6C', type: 'warning' }],
    [2, { value: 2, label: '待确认', color: '#E6A23C', type: 'danger' }],
    [3, { value: 3, label: '已完成', color: '#67C23A', type: 'success' }]
  ]
)
constants.costSuccessStatus = new Map(
  [
    [0, { value: 0, label: '待核对', color: '#909399', type: 'info' }],
    [1, { value: 1, label: '待结算', color: '#F56C6C', type: 'warning' }],
    [2, { value: 2, label: '待确认', color: '#E6A23C', type: 'danger' }]
  ]
)

// 启用停用状态
constants.generalUsed = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    ['Y', { value: 'Y', label: '已启用', color: '#F56C6C' }],
    ['N', { value: 'N', label: '已停用', color: '#409EFF' }]
  ]
)
// 车源类型
constants.carSource = new Map([
  ['w', { value: 'w', label: '外调车', color: '#F56C6C' }],
  ['z', { value: 'z', label: '自营车', color: '#409EFF' }]
])

constants.exerciseType = new Map(
  [
    [0, { value: 0, label: '往', color: '#F56C6C' }],
    [1, { value: 1, label: '返', color: '#409EFF' }],
    [2, { value: 2, label: '往返', color: '#409EFF' }]
  ]
)
constants.lineType = new Map(
  [
    [0, { value: 0, label: '直达', color: '#606266', type: 'info' }],
    [1, { value: 1, label: '回头', color: '#303133', type: 'danger' }]
  ]
)
constants.supOrderStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '待发货', disabled: false, color: '#F56C6C', type: 'danger' }],
    [1, { value: 1, label: '已发货,待收货', disabled: false, color: '#409EFF', type: 'danger' }],
    [2, { value: 2, label: '已收货,待定价', disabled: false, color: '#409EFF', type: 'danger' }],
    [3, { value: 3, label: '已定价,待核算', disabled: false, color: '#409EFF', type: 'danger' }],
    [10, { value: 10, label: '已核算,待审批', disabled: false, color: '#409EFF', type: 'danger' }],
    [4, { value: 4, label: '已审批,待结算', disabled: false, color: '#409EFF', type: 'danger' }],
    [5, { value: 5, label: '已完成', disabled: false, color: '#67C23A', type: 'success' }],
    [6, { value: 6, label: '已取消', disabled: false, color: 'black', type: 'info' }],
    [7, { value: 7, label: '已退货', disabled: false, color: 'black', type: 'info' }],
    [9, { value: 9, label: '已回收', disabled: false, color: 'black', type: 'danger' }]
  ]
)
constants.supReturnStatus = new Map(
  [
    ['All', { value: 'All', label: '全部', disabled: true, color: '' }],
    [0, { value: 0, label: '待发货', disabled: false, color: '#F56C6C', type: 'danger' }],
    [1, { value: 1, label: '已发货,待收货', disabled: false, color: '#409EFF', type: 'danger' }],
    [2, { value: 2, label: '已完成', disabled: false, color: '#409EFF', type: 'success' }],
    [3, { value: 3, label: '已取消', disabled: false, color: '#409EFF', type: 'info' }]

  ]
)
constants.supOrderFlag = new Map(
  [
    [0, { value: 0, label: '正常', disabled: false, color: '#409EFF', type: 'info' }],
    [1, { value: 1, label: '驳回', disabled: false, color: '#409EFF', type: 'danger' }],
    [2, { value: 2, label: '部分退货', disabled: false, color: '#409EFF', type: 'danger' }],
    [3, { value: 3, label: '暂不付款', disabled: false, color: '#409EFF', type: 'danger' }],
    [4, { value: 4, label: '急需付款', disabled: false, color: '#409EFF', type: 'danger' }]

  ]
)
// 外调车id
constants.otherCarId = 528

constants.ws = {
  LOGIN: 11002, // 登录
  PUSH_ORDER_CHANGE: 20000, // 订单变化
  PUSH_ORDER_CHANGE_LOGISTICS: 20001, // 物流订单变化
  PUSH_ORDER_CHANGE_LOGISTICS_COST: 20002, // 物流支出单
  PUSH_ORDER_CHANGE_LOGISTICS_BACKCAR: 20003, // 回头车
  PUSH_REQUEST: 11003 // 订阅
}
export default constants
